//
//  AboutViewController.m
//  gamebox_qpp
//
//  Created by 赵隆杰 on 2021/12/11.
//

#import "AboutViewController.h"

@interface AboutViewController ()

@property (nonatomic, strong) UIImageView *imageView;
@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation AboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.centerTitle.text = @"关于我们";
    
    UIImageView *imageView = [[UIImageView alloc] init];
    imageView.image = [UIImage imageNamed:@"appicon"];
    imageView.contentMode = UIViewContentModeScaleAspectFill;
    imageView.layer.cornerRadius = 5;
    imageView.layer.masksToBounds = YES;
    [self.view addSubview:imageView];
    self.imageView = imageView;
    [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.width.height.equalTo(@100);
        make.top.equalTo(self.view).offset(150);
    }];

    UILabel *titleLabel = [[UILabel alloc] init];
    titleLabel.font = [UIFont systemFontOfSize:14];
    [self.view addSubview:titleLabel];
    self.titleLabel = titleLabel;
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.top.equalTo(_imageView.mas_bottom).offset(10);
        make.height.equalTo(@40);
    }];
    
    //系统直接读取的版本号
    NSString *versionValueStringForSystemNow = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
    self.titleLabel.text = [NSString stringWithFormat:@"当前版本：V%@", versionValueStringForSystemNow];
    
    UILabel *chanpinTitle = [[UILabel alloc] init];
    chanpinTitle.font = [UIFont boldSystemFontOfSize:18];
    chanpinTitle.text = [NSString stringWithFormat:@"产品介绍"];
    [self.view addSubview:chanpinTitle];
    [chanpinTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view).offset(20);
        make.top.equalTo(self.titleLabel.mas_bottom).offset(50);
        make.height.equalTo(@40);
    }];
    
    UILabel *chanpinContent = [[UILabel alloc] init];
    chanpinContent.font = [UIFont systemFontOfSize:14];
    chanpinContent.textColor = kColor333333;
    chanpinContent.numberOfLines = 0;
    chanpinContent.text = [NSString stringWithFormat:@"奇葩葩App为湖南奇葩乐游网络科技有限公司旗下一款游戏类资讯App，旨在提供与公司及游戏行业的相关资讯，让用户更加清晰的了解和熟悉奇葩乐游公司的产品。"];
    [self.view addSubview:chanpinContent];
    [chanpinContent mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view).offset(20);
        make.top.equalTo(chanpinTitle.mas_bottom).offset(10);
        make.right.equalTo(self.view).offset(-20);
    }];

    UILabel *bottomLabel = [[UILabel alloc] init];
    bottomLabel.font = [UIFont systemFontOfSize:14];
    bottomLabel.textAlignment = NSTextAlignmentCenter;
    bottomLabel.text = [NSString stringWithFormat:@"联系方式：695961112@qq.com"];
    [self.view addSubview:bottomLabel];
    [bottomLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.bottom.equalTo(self.view).offset(-100);
        make.height.equalTo(@40);
    }];
    
    UILabel *bottomLabel1 = [[UILabel alloc] init];
    bottomLabel1.font = [UIFont systemFontOfSize:12];
    bottomLabel1.textColor = kColor666666;
    bottomLabel1.textAlignment = NSTextAlignmentCenter;
    bottomLabel1.text = [NSString stringWithFormat:@"如有任何问题，请联系我们"];
    [self.view addSubview:bottomLabel1];
    [bottomLabel1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.bottom.equalTo(bottomLabel.mas_top);
        make.height.equalTo(@40);
    }];
}


@end
